package com.atguigu.udmp.web.userprofile.mapper;

import com.atguigu.udmp.web.userprofile.bean.TagInfo;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhangchen
 * @since 2023-11-10
 */
@Mapper
@DS("udmp")
public interface TagInfoMapper extends BaseMapper<TagInfo> {

    @Select("select  tg.id,tag_code ,tag_name,tag_level ,tag_value_type ,parent_tag_id, tk.id as task_id,tag_comment,tg.create_time, task_status ,is_exception " +
            "from tag_info tg left join  task_info tk on tg.id=tk.tag_id  order by tag_level ,id"  )
    public List<TagInfo> selectTagInfoAllWithStatus();

}
